﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WindowsFormsView;
using WindowsFormsModel.BusinessObjects;

namespace WindowsFormsPresenter.Stock
{
    public class StocksPresenter : Presenter<IStocksView>
    {
        public StocksPresenter(IStocksView view)
            : base(view)
        {
        }

        public void DisplayByPageAndBranch(int currentPage)
        {
            View.Stocks = Model.GetStocksByPageAndBranch(currentPage);
        }

        public int GetTotalPageByBranch()
        {
            return Model.GetTotalPageFromStockByBranch();
        }

        public void DisplayActive()
        {
            View.Stocks = Model.GetStocksActive();
        }

        public void DisplayActiveByBranch()
        {
            View.Stocks = Model.GetStocksActiveByBranch();
        }
    }
}
